package gunfire.relics;

import basemod.abstracts.CustomRelic;
import com.badlogic.gdx.graphics.Texture;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.relics.AbstractRelic;
import gunfire.GunfireMod;
import gunfire.util.TextureLoader;

import static gunfire.GunfireMod.makeRelicOutlinePath;
import static gunfire.GunfireMod.makeRelicPath;

public class DevilCovenant extends CustomRelic {

    public static final String ID = GunfireMod.makeID("DevilCovenant");
    private static final Texture IMG = TextureLoader.getTexture(makeRelicPath("DevilCovenant.png"));
    private static final Texture OUTLINE = TextureLoader.getTexture(makeRelicOutlinePath("blank.png"));

    public DevilCovenant() {
        super(ID, IMG, OUTLINE, RelicTier.SHOP, LandingSound.CLINK);
    }

    @Override
    public void onEquip() {
        int maxHp = AbstractDungeon.player.maxHealth;
        AbstractDungeon.player.decreaseMaxHealth(maxHp / 2);
    }

    @Override
    public void onVictory() {
        this.flash();
        CardCrawlGame.sound.play("GOLD_JINGLE");
        AbstractDungeon.player.gainGold(50);
    }

    @Override
    public String getUpdatedDescription() {
        return DESCRIPTIONS[0];
    }

    @Override
    public AbstractRelic makeCopy() {
        return new DevilCovenant();
    }
}
